home *** CD-ROM | disk | FTP | other *** search
Wrap
; PICTURE.DAT [GetPhotoCollectionData] ; prior to calling, set the following temporary variables ; nPicturesVar = name of variable to hold number of picture ; pictureNameRoot = root of picture names, see example ; pictureCaptionRoot = root of picture captions, see example ; for example, ; SETTEMP nPicturesVar = "nNewletterPictures" ; SETTEMP pictureNameRoot = "newsPix" ; SETTEMP pictureCaptionRoot = "newsPixText" ; SETTEMP styleVar = "newsAlbumStyle" ; GOSUB GetPhotoCollectionData ; ; then on return from the routine, the variable nNewletterPictures will ; contain the number of pictures, the picture names will be in ; variables newsPix1, newsPix2, newsPix3, etc, and the album style (1|2|3) ; will be in the variable newsAlbumStyle. SETTEMP GPCDalbumStyle = eval( styleVar ) SETTEMP GPCDnPictures = eval( nPicturesVar ) SETTEMP pxprmpt1 = "Select the " SETTEMP pxprmpt2 = " picture for your collection and enter a caption describing the picture.\n\nIt's best to limit the caption to one or two words." BACKSTOP PAGE WIZPIC wizpics\wizalbum.gif TYPE RADIOBUTTONS NAME GPCDnPictures DESCRIPTION How many pictures would you like to include in this picture collection display? ARGUMENT "&Three photos"@3@"wizpics\pix_3.gif" ARGUMENT "&Six photos"@6@"wizpics\pix_6.gif" ARGUMENT "N&ine photos"@9@"wizpics\pix_9.gif" SET eval( nPicturesVar ) = GPCDnPictures BACKSTOP PAGE WIZPIC wizpics\wizalbum.gif TYPE LIST NAME GPCDalbumStyle DESCRIPTION Choose from one of the styling selections below for your album. This choice determines how the pages that contain the photo album page are decorated (both the `thumbnails' page and the individual picture pages). ARGUMENT "Photo memories"@1@"wizpics\photmem1.gif" ARGUMENT "Holiday memories"@2@"wizpics\holidmem.gif" ARGUMENT "Vacation photos"@3@"wizpics\vacatpho.gif" ARGUMENT "Party photos"@4@"wizpics\partypho.gif" ARGUMENT "Holiday photos"@5@"wizpics\hold2pho.gif" ARGUMENT "Just Photos (generic)"@6@"wizpics\genrcpho.gif" ARGUMENT "School Photos"@7@"wizpics\scholpho.gif" ARGUMENT "Fun Photos"@8@"wizpics\funphoto.gif" SET eval( styleVar ) = GPCDalbumStyle BACKSTOP SETTEMP nNumber = 1 GOSUB GetEachPix BACKSTOP SETTEMP nNumber = 2 GOSUB GetEachPix BACKSTOP SETTEMP nNumber = 3 GOSUB GetEachPix IF GPCDnPictures > 3 BACKSTOP SETTEMP nNumber = 4 GOSUB GetEachPix BACKSTOP SETTEMP nNumber = 5 GOSUB GetEachPix BACKSTOP SETTEMP nNumber = 6 GOSUB GetEachPix ENDIF IF GPCDnPictures > 6 BACKSTOP SETTEMP nNumber = 7 GOSUB GetEachPix BACKSTOP SETTEMP nNumber = 8 GOSUB GetEachPix BACKSTOP SETTEMP nNumber = 9 GOSUB GetEachPix ENDIF SETTEMP sectionCompleted = 1 [GetEachPix] GOSUB Ordinal ;on call, nNumber contains pix# SETTEMP enterPixVar = pictureNameRoot,nNumber SETTYPE eval( enterPixVar ) = normal SETTEMP temp = eval( enterPixVar ) IF temp <> "" SETTEMP enterpix = temp ELSE SETTEMP enterpix = "" ENDIF SETTEMP enterCaptionVar = pictureCaptionRoot,nNumber SETTEMP temp = eval( enterCaptionVar ) IF temp <> "" SETTEMP captiontext = temp ELSE SETTEMP captiontext = "" ENDIF PAGE NOSPELLCHECK WIZPIC wizpics\wizphoto.gif TYPE PICTUREANDCAPTION NAME enterpix PROMPT Pi&cture: ARGUMENT Capt&ion:@captiontext DESCRIPTION_RE pxprmpt1,ordinal,pxprmpt2 SETTEMP temp = modulepath( "x" ) SETTYPE enterpix = normal SETTEMP temp2 = enterpix,"x" IF enterpix = "" || temp2 = temp MESSAGEBOX "You must choose a picture. You cannot leave holes in the photo album. Press OK to enter a valid picture." GOTO GetEachPix ENDIF SETTYPE enterpix = normal SET eval( enterPixVar ) = enterpix SET eval( enterCaptionVar ) = captiontext ;xxxxxxxxxxxxxxxxxxxx BUILD THUMBNAIL PAGE xxxxxxxxxxxxxxxxxxxxxxxxx [MakePhotoAlbumPages] ; prior to calling, set the following temporary variables ; nPictures = number of pictures in album ; albumStyle = style (1|2|3) ; parentTopic = id of topic that is the parent topic of this album ; albumTopic = name of VARIABLE to contain topic id of thumbnails page ; pictureNameRoot = root of picture names, see example ; pictureCaptionRoot = root of picture captions, see example ; albumTitle = title for thumbnail page ; photo_mode = "personal" or "news" ; photoPageNameVar = root for names of page variables, used ; to make sure that pages get replaced where appropriate ; for example, ; SETTEMP parentTopic = pageNews ; SETTEMP albumTopic = "newsAlbumTopicID" ; SETTEMP nPictures = 3 ; SETTEMP pictureNameRoot = "newsPix" ; SETTEMP pictureCaptionRoot = "newsPixText" ; SETTEMP albumStyle = 1 ; SETTEMP photo_mode = "personal" ; GOSUB MakePhotoAlbumPages ; Build the thumbnail page first IF photo_mode <> "news" SETTEMP prefix = "My " ELSE SETTEMP prefix = "" ENDIF IF albumStyle = 1 SETTEMP album_template = "Photo Memory Thumbnails - " SETTEMP tit1 = prefix,"Photographic Memories" SETTEMP ind_pix_template = "Photo Display Page" ENDIF IF albumStyle = 2 ;Christmas theme SETTEMP album_template = "Holiday Thumbnails - " SETTEMP tit1 = prefix,"Holiday Memories" SETTEMP ind_pix_template = "Holiday Photo Page" ENDIF IF albumStyle = 3 SETTEMP album_template = "Vacation Thumbnails - " SETTEMP tit1 = prefix,"Vacation Photos" SETTEMP ind_pix_template = "Vacation Photo Page" ENDIF IF albumStyle = 4 SETTEMP album_template = "Party Thumbnails - " SETTEMP tit1 = prefix,"Party Photos" SETTEMP ind_pix_template = "Party Photo Display Page" ENDIF IF albumStyle = 5 ;Generic holiday SETTEMP album_template = "Holiday 2 Thumbnails - " SETTEMP tit1 = prefix,"Holiday Photos" SETTEMP ind_pix_template = "Holiday 2 Photo Page" ENDIF IF albumStyle = 6 ;generic photos SETTEMP album_template = "Photo Thumbnails - " SETTEMP tit1 = prefix,"Photos" SETTEMP ind_pix_template = "Photo2 Display Page" ENDIF IF albumStyle = 7 SETTEMP album_template = "School Thumbnails - " SETTEMP tit1 = prefix,"School Photos" SETTEMP ind_pix_template = "School Photo Display Page" ENDIF IF albumStyle = 8 SETTEMP album_template = "Fun Thumbnails - " SETTEMP tit1 = prefix,"Fun Photos" SETTEMP ind_pix_template = "Fun Photo Display Page" ENDIF SET album_template = album_template,nPictures IF photo_mode = "news" SETTEMP tit2 = "The ",familyLastName," Family" SETTEMP top_title = tit1,": ",tit2 ELSE SETTEMP tit2 = name," ",familyLastName SETTEMP top_title = tit1,": ",tit2 ENDIF SETPARENTTOPIC parentTopic SETTEMP GPCDnPictures = nPictures GOSUB SetupAlbumPictureVariables SETTEMP photoPageName = "PhotoThumbnails",pictureNameRoot ; build thumbnail page BUILDTOPIC photoPageName REPLACE eval( albumTopic ) album_template ;template none ;backdrop 1 ;level 9 ;# links "##Photo1",pictureNameRoot "##Photo2",pictureNameRoot "##Photo3",pictureNameRoot "##Photo4",pictureNameRoot "##Photo5",pictureNameRoot "##Photo6",pictureNameRoot "##Photo7",pictureNameRoot "##Photo8",pictureNameRoot "##Photo9",pictureNameRoot 20 ;# fields top_title tit2 pix1 cap1 pix2 cap2 pix3 cap3 pix4 cap4 pix5 cap5 pix6 cap6 pix7 cap7 pix8 cap8 pix9 cap9 SET eval( albumTopic ) = topicfromsymbolic( photoPageName ) ; now build individual photo pages SETTEMP GPCDnPictures = nPictures SETTEMP nNumber = 1 GOSUB BuildIndPages ;xxxxxxxxxxxxxxxxx MAKE TOPICS FOR PHOTO PAGES xxxxxxxxxxxxxxxxxxxxxxxx [BuildIndPages] IF photo_mode <> "" SETTEMP capVar = "cap",nNumber SETTEMP pixVar = "pix",nNumber SETTYPE eval( pixVar ) = normal SETTEMP thisPicture = eval( pixVar ) SETTEMP thisCaption = eval( capVar ) SETSCALE thisPicture = 400 320 SETTYPE thisPicture = picture SETTEMP page_name = familyLastName," Photos: ",thisCaption SETTEMP col_name = familyLastName,": Photo Collection" ELSE ;called to build empty page SETTEMP page_name = "Unused Page" ENDIF SETTEMP thisTopicName = "##Photo",nNumber,pictureNameRoot SETPARENTTOPIC eval( albumTopic ) SETTEMP pageIDName = photoPageNameVar,nNumber BUILDTOPIC thisTopicName REPLACE eval( pageIDName ) ind_pix_template ;template set previously none ;backdrop 1 ;level 0 ;# links 4 ;# fields page_name thisPicture thisCaption col_name SET eval( pageIDName ) = topicfromsymbolic( thisTopicName ) SETTEMP GPCDnPictures = subtract( GPCDnPictures 1 ) SETTEMP nNumber = add( nNumber 1 ) IF GPCDnPictures <> 0 GOTO BuildIndPages ENDIF [SetupAlbumPictureVariables] SETTEMP pixVar = pictureNameRoot,GPCDnPictures SETTEMP capVar = pictureCaptionRoot,GPCDnPictures SETTYPE eval( pixVar ) = normal SETTEMP eval( "pix",GPCDnPictures ) = eval( pixVar ) SETTYPE eval( "pix",GPCDnPictures ) = picture SETSCALE eval( "pix",GPCDnPictures ) = 80 60 SETTEMP eval( "cap",GPCDnPictures ) = eval( capVar ) SETTEMP GPCDnPictures = subtract( GPCDnPictures 1 ) IF GPCDnPictures <> 0 GOTO SetupAlbumPictureVariables ENDIF ;xxxxxxxxxxxxxxxxxxxxxxx ORDINAL - SET NUMBER WORDS xxxxxxxxxxxxxx [Ordinal] IF nNumber < 7 IF nNumber = 1 SETTEMP ordinal = "first" SETTEMP numeral = "one" ENDIF IF nNumber = 2 SETTEMP ordinal = "second" SETTEMP numeral = "two" ENDIF IF nNumber = 3 SETTEMP ordinal = "third" SETTEMP numeral = "three" ENDIF IF nNumber = 4 SETTEMP ordinal = "fourth" SETTEMP numeral = "four" ENDIF IF nNumber = 5 SETTEMP ordinal = "fifth" SETTEMP numeral = "five" ENDIF IF nNumber = 6 SETTEMP ordinal = "sixth" SETTEMP numeral = "six" ENDIF ENDIF ; if nNumber<7 IF nNumber > 6 IF nNumber = 7 SETTEMP ordinal = "seventh" SETTEMP numeral = "seven" ENDIF IF nNumber = 8 SETTEMP ordinal = "eighth" SETTEMP numeral = "eight" ENDIF IF nNumber = 9 SETTEMP ordinal = "ninth" SETTEMP numeral = "nine" ENDIF IF nNumber = 10 SETTEMP ordinal = "tenth" SETTEMP numeral = "ten" ENDIF IF nNumber = 11 SETTEMP ordinal = "eleventh" SETTEMP numeral = "eleven" ENDIF IF nNumber = 12 SETTEMP ordinal = "twelfth" SETTEMP numeral = "twelve" ENDIF ENDIF ; if nNumber>6 [InitPixVars] SETTEMP GPCDalbumStyle = "" SETTEMP GPCDnPictures = "" SETTEMP enterpix = "" SETTEMP captiontext = ""